using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Sampling
{
    /// <summary>
    /// <para>Create Fishnet</para>
    /// <para>Creates a fishnet of rectangular cells.  The output can be polyline or polygon features.</para>
    /// <para>创建矩形单元格的渔网。 输出可以是折线要素或面要素。</para>
    /// </summary>    
    [DisplayName("Create Fishnet")]
    public class CreateFishnet : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateFishnet()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the fishnet of rectangular cells.</para>
        /// <para>包含矩形像元渔网的输出要素类。</para>
        /// </param>
        /// <param name="_origin_coord">
        /// <para>Fishnet Origin Coordinate</para>
        /// <para>The starting pivot point of the fishnet.</para>
        /// <para>渔网的起始枢轴点。</para>
        /// </param>
        /// <param name="_y_axis_coord">
        /// <para>Y-Axis Coordinate</para>
        /// <para>The Y-axis coordinate is used to orient the fishnet. The fishnet is rotated by the same angle as defined by the line connecting the origin and the y-axis coordinate.</para>
        /// <para>Y 轴坐标用于确定渔网的方向。渔网的旋转角度与连接原点和 y 轴坐标的线所定义的角度相同。</para>
        /// </param>
        /// <param name="_cell_width">
        /// <para>Cell Size Width</para>
        /// <para>Determines the width of each cell. If you want the width to be automatically calculated using the value in the Number of Rows parameter, leave this parameter empty or set the value to zero—the width will be calculated when the tool is run.</para>
        /// <para>确定每个单元格的宽度。如果希望使用行数参数中的值自动计算宽度，请将此参数留空或将该值设置为零 - 将在运行工具时计算宽度。</para>
        /// </param>
        /// <param name="_cell_height">
        /// <para>Cell Size Height</para>
        /// <para>Determines the height of each cell. If you want the height to be automatically calculated using the value in the Number of Columns parameter, leave this parameter empty or set the value to zero—the height will be calculated when the tool is run.</para>
        /// <para>确定每个单元格的高度。如果希望使用列数参数中的值自动计算高度，请将此参数留空或将值设置为零 - 将在运行工具时计算高度。</para>
        /// </param>
        /// <param name="_number_rows">
        /// <para>Number of Rows</para>
        /// <para>Determines the number of rows the fishnet will have. If you want the number of rows to be automatically calculated using the value in the Cell Size Width parameter, leave this parameter empty or set the value to zero—the number of rows will be calculated when the tool is run.</para>
        /// <para>确定渔网的行数。如果希望使用单元格大小宽度参数中的值自动计算行数，请将此参数留空或将该值设置为零 - 行数将在运行工具时计算。</para>
        /// </param>
        /// <param name="_number_columns">
        /// <para>Number of Columns</para>
        /// <para>Determines the number of columns the fishnet will have. If you want the number of columns to be automatically calculated using the value in the Cell Size Height parameter, leave this parameter empty or set the value to zero—the number of columns will be calculated when the tool is run.</para>
        /// <para>确定渔网的列数。如果希望使用单元格大小高度参数中的值自动计算列数，请将此参数留空或将该值设置为零 - 运行该工具时将计算列数。</para>
        /// </param>
        public CreateFishnet(object _out_feature_class, object _origin_coord, object _y_axis_coord, double? _cell_width, double? _cell_height, long? _number_rows, long? _number_columns)
        {
            this._out_feature_class = _out_feature_class;
            this._origin_coord = _origin_coord;
            this._y_axis_coord = _y_axis_coord;
            this._cell_width = _cell_width;
            this._cell_height = _cell_height;
            this._number_rows = _number_rows;
            this._number_columns = _number_columns;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create Fishnet";

        public override string CallName => "management.CreateFishnet";

        public override List<string> AcceptEnvironments => ["MDomain", "XYDomain", "ZDomain", "configKeyword", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue"];

        public override object[] ParameterInfo => [_out_feature_class, _origin_coord, _y_axis_coord, _cell_width, _cell_height, _number_rows, _number_columns, _corner_coord, _labels.GetGPValue(), _template, _geometry_type.GetGPValue(), _out_label];

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the fishnet of rectangular cells.</para>
        /// <para>包含矩形像元渔网的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Fishnet Origin Coordinate</para>
        /// <para>The starting pivot point of the fishnet.</para>
        /// <para>渔网的起始枢轴点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fishnet Origin Coordinate")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _origin_coord { get; set; }


        /// <summary>
        /// <para>Y-Axis Coordinate</para>
        /// <para>The Y-axis coordinate is used to orient the fishnet. The fishnet is rotated by the same angle as defined by the line connecting the origin and the y-axis coordinate.</para>
        /// <para>Y 轴坐标用于确定渔网的方向。渔网的旋转角度与连接原点和 y 轴坐标的线所定义的角度相同。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y-Axis Coordinate")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _y_axis_coord { get; set; }


        /// <summary>
        /// <para>Cell Size Width</para>
        /// <para>Determines the width of each cell. If you want the width to be automatically calculated using the value in the Number of Rows parameter, leave this parameter empty or set the value to zero—the width will be calculated when the tool is run.</para>
        /// <para>确定每个单元格的宽度。如果希望使用行数参数中的值自动计算宽度，请将此参数留空或将该值设置为零 - 将在运行工具时计算宽度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Size Width")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _cell_width { get; set; }


        /// <summary>
        /// <para>Cell Size Height</para>
        /// <para>Determines the height of each cell. If you want the height to be automatically calculated using the value in the Number of Columns parameter, leave this parameter empty or set the value to zero—the height will be calculated when the tool is run.</para>
        /// <para>确定每个单元格的高度。如果希望使用列数参数中的值自动计算高度，请将此参数留空或将值设置为零 - 将在运行工具时计算高度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Size Height")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _cell_height { get; set; }


        /// <summary>
        /// <para>Number of Rows</para>
        /// <para>Determines the number of rows the fishnet will have. If you want the number of rows to be automatically calculated using the value in the Cell Size Width parameter, leave this parameter empty or set the value to zero—the number of rows will be calculated when the tool is run.</para>
        /// <para>确定渔网的行数。如果希望使用单元格大小宽度参数中的值自动计算行数，请将此参数留空或将该值设置为零 - 行数将在运行工具时计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Rows")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _number_rows { get; set; }


        /// <summary>
        /// <para>Number of Columns</para>
        /// <para>Determines the number of columns the fishnet will have. If you want the number of columns to be automatically calculated using the value in the Cell Size Height parameter, leave this parameter empty or set the value to zero—the number of columns will be calculated when the tool is run.</para>
        /// <para>确定渔网的列数。如果希望使用单元格大小高度参数中的值自动计算列数，请将此参数留空或将该值设置为零 - 运行该工具时将计算列数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Columns")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _number_columns { get; set; }


        /// <summary>
        /// <para>Opposite corner of Fishnet</para>
        /// <para>The opposite corner of the fishnet set by X-Coordinate and Y-Coordinate values. The values for opposite corner are automatically set if a template extent is used. This parameter becomes disabled if the origin, Y-axis, cell size, and number of rows and columns are set.</para>
        /// <para>由 X 坐标和 Y 坐标值设置的渔网的对角。如果使用模板范围，则会自动设置对角的值。如果设置了原点、Y 轴、像元大小以及行数和列数，则此参数将被禁用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Opposite corner of Fishnet")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _corner_coord { get; set; } = null;


        /// <summary>
        /// <para>Create Label Points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether or not a point feature class will be created containing label points at the center of each fishnet cell.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A new feature class is created with label points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The label points feature class is not created.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否要创建包含每个渔网像元中心的标注点的点要素类。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 使用标注点创建新要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 未创建标注点要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Label Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _labels_value _labels { get; set; } = _labels_value._true;

        public enum _labels_value
        {
            /// <summary>
            /// <para>LABELS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LABELS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_LABELS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_LABELS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Template Extent</para>
        /// <para><xdoc>
        ///   <para>Specify the extent of the fishnet. The extent can be entered by specifying the coordinates or using a template dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定渔网的范围。可以通过指定坐标或使用模板数据集来输入范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于数据框或可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Template Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _template { get; set; } = null;


        /// <summary>
        /// <para>Geometry Type</para>
        /// <para><xdoc>
        ///   <para>Determines if the output fishnet cells will be polyline or polygon features.</para>
        ///   <bulletList>
        ///     <bullet_item>Polyline—Output is a polyline feature class. Each cell is defined by four line features.</bullet_item><para/>
        ///     <bullet_item>Polygon—Output is a polygon feature class. Each cell is defined by one polygon feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定输出渔网像元是折线要素还是面要素。</para>
        ///   <bulletList>
        ///     <bullet_item>折线 - 输出为折线要素类。每个像元由四个线要素定义。</bullet_item><para/>
        ///     <bullet_item>面 - 输出为面要素类。每个像元由一个面要素定义。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geometry Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _geometry_type_value _geometry_type { get; set; } = _geometry_type_value._POLYLINE;

        public enum _geometry_type_value
        {
            /// <summary>
            /// <para>Polyline</para>
            /// <para>Polyline—Output is a polyline feature class. Each cell is defined by four line features.</para>
            /// <para>折线 - 输出为折线要素类。每个像元由四个线要素定义。</para>
            /// </summary>
            [Description("Polyline")]
            [GPEnumValue("POLYLINE")]
            _POLYLINE,

            /// <summary>
            /// <para>Polygon</para>
            /// <para>Polygon—Output is a polygon feature class. Each cell is defined by one polygon feature.</para>
            /// <para>面 - 输出为面要素类。每个像元由一个面要素定义。</para>
            /// </summary>
            [Description("Polygon")]
            [GPEnumValue("POLYGON")]
            _POLYGON,

        }

        /// <summary>
        /// <para>Output Label Feature Class (Optional)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Label Feature Class (Optional)")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_label { get; set; }


        public CreateFishnet SetEnv(object MDomain = null, object XYDomain = null, object ZDomain = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null)
        {
            base.SetEnv(MDomain: MDomain, XYDomain: XYDomain, ZDomain: ZDomain, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue);
            return this;
        }

    }

}